package com.csun.cmny.provider.service;

import com.csun.cmny.core.support.IService;
import com.csun.cmny.provider.model.domain.UacAction;
import com.csun.cmny.provider.model.domain.UacGroupRoleAction;
import com.csun.cmny.provider.model.domain.UacRoleAction;
import com.csun.cmny.provider.model.dto.group.GroupActionQueryDto;
import com.csun.cmny.provider.model.dto.group.GroupRoleActionListDto;
import com.csun.cmny.provider.model.dto.group.GroupRoleAssignActionDto;
import com.csun.cmny.provider.model.dto.group.GroupRoleDto;
import com.csun.cmny.provider.model.vo.BindAuthVo;
import com.github.pagehelper.PageInfo;

import java.util.List;
import java.util.Set;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2019-07-21 13:04
 * @Description: the interface uac group role action service
 */
public interface UacGroupRoleActionService extends IService<UacGroupRoleAction> {

    /**
     * 批量移除机构角色功能
     *
     * @param groupRoleActionListDto    the group role action list dto
     *
     * @return  the int.
     */
    Integer batchDeleteRoleAction(GroupRoleActionListDto groupRoleActionListDto);

    /**
     * 分配机构角色功能
     *
     * @param groupRoleAssignActionDto  the group role assign action dto
     *
     * @return  the int.
     */
    Integer assignRoleAction(GroupRoleAssignActionDto groupRoleAssignActionDto);

    /**
     * 获取机构角色功能列表
     *
     * @param groupActionQueryDto	the group action query dto
     *
     * @return	the page info.
     */
    PageInfo queryRoleActionListWithPage(GroupActionQueryDto groupActionQueryDto);

    /**
     * 批量添加机构角色功能
     *
     * @param groupId               the group id
     * @param uacRoleActionList     the uac role action list
     *
     * @return  the int.
     */
    Integer batchSaveGroupRoleAction(Long groupId, List<UacRoleAction> uacRoleActionList);

    /**
     * get group role action tree
     *
     * @param groupRoleDto  the group role dto
     *
     * @return  the bind auth vo
     */
    BindAuthVo getGroupRoleActionTree(GroupRoleDto groupRoleDto);

    /**
     * 获取选中的功能列表
     *
     * @param groupRoleDto  the group role dto
     *
     * @return  the list
     */
    List<Long> getCheckedActionList(GroupRoleDto groupRoleDto);

    /**
     * select count by role id and action id list
     *
     * @param roleId        the role id
     * @param actionIdList  the action id list
     *
     * @return  the int
     */
    int selectCountRoleIdAndActionIdList(Long roleId, List<Long> actionIdList);

    /**
     * query role action
     *
     * @param uacGroupRoleAction    the uac group role action
     *
     * @return  the uac action
     */
    UacAction queryRoleAction(UacGroupRoleAction uacGroupRoleAction);

    /**
     * select count action id and role id list
     *
     * @param actionId          action id
     * @param deleteRoleList    delete role list
     *
     * @return  the int.
     */
    int selectCountActionIdAndRoleIdList(Long actionId, List<Long> deleteRoleList);
}
